const { VITE_HIDE_HOME } = import.meta.env;
const Layout = () => import("@/layout/index.vue");

export default [
  {
    path: "/",
    name: "Home",
    component: Layout,
    redirect: "/welcome",
    meta: {
      icon: "ep:home-filled",
      title: "首页",
      rank: 0
    },
    children: [
      {
        path: "/welcome",
        name: "Welcome",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          showLink: VITE_HIDE_HOME === "true" ? false : true
        }
      }
    ]
  },
  {
    path: "/logs",
    name: "LOG",
    meta: { title: "日志", showLink: false },
    redirect: "/logs/monitor",
    children: [
      {
        path: "/logs/monitor",
        name: "LogsMointor",
        component: () => import("@/views/logs/monitor/index.vue"),
        meta: {
          title: "操作记录"
        }
      },
      {
        path: "/logs/manager",
        name: "LogsManager",
        component: () => import("@/views/logs/manager/index.vue"),
        meta: {
          title: "最新动态"
        }
      }
    ]
  },
  {
    name: "hiddenMenus",
    path: "/hiddenMenus",
    meta: { showLink: false, title: "隐藏菜单" },
    children: [
      {
        path: "/statistics/board",
        name: "StatisticsBoard",
        component: () => import("@/views/statistics/board/index.vue"),
        meta: {
          title: "数据统计",
          activePath: "/statistics"
        }
      },
      {
        path: "/notice",
        name: "Notice",
        component: () => import("@/views/notice/index.vue"),
        meta: {
          title: "通知",
          activePath: "/notice"
        }
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
